import * as actionsType from '../actionType/content.action.type'

const initialState = {
  content: ['默认数据']
}

// 创建reducer
export default (state = initialState, action) => {
  // state:
  console.log(action)
  switch (action.type) {
    case actionsType.ADDCONTENT: 
       return {
         content: [
           ...state.content,
           action.payload
         ]
       }
    default:
      return state
  }
}